package com.aps.entity.domain.dish;

import java.math.BigDecimal;

import javax.persistence.*;

import com.aps.entity.domain.BaseEntity;
import com.aps.entity.eunm.TimeUnitType;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author liaoguangan
 * @description <菜品>
 * @date 2018/4/1 14:44
 */
@Table(name = "aps_dish")
@Entity
@Data
@ApiModel
public class Dish extends BaseEntity {

    @Column
    @ApiModelProperty("菜品代码")
    private String code;

    @Column
    @ApiModelProperty("菜品名称")
    private String name;

    @Column
    @ApiModelProperty("菜品类别代码")
    private String dishTypeCode;

    @Column
    @ApiModelProperty("加工设备类型代码")
    private String deviceTypeCode;

    @Column
    @ApiModelProperty("是否可以合菜")
    private Boolean merge;

    @Column
    @ApiModelProperty("菜品规格代码")
    private String dishSpecCode;

    @Column
    @ApiModelProperty("门店代码")
    private String storeCode;

    @Column
    @ApiModelProperty("字母首拼")
    private String letterFirPy;

    @Column
    @ApiModelProperty("设备显示名")
    private String deviceDisplayName;

    @Column
    @ApiModelProperty("单位")
    private String unit;

    @Column
    @ApiModelProperty("保质时长")
    private BigDecimal expTime;

    @Column
    @ApiModelProperty("保质时长单位")
    @Enumerated(EnumType.STRING)
    private TimeUnitType expTimeUnit;

    @Column
    @ApiModelProperty("加工时长")
    private BigDecimal processTime;

    @Column
    @ApiModelProperty("加工时长单位")
    @Enumerated(EnumType.STRING)
    private TimeUnitType processTimeUnit;

    ///////////////////////////////

    @Transient
    private String dishTypeName;
    @Transient
    private String deviceTypeName;
    @Transient
    private String storeName;
}
